﻿using ACServerApi.Extensions;
using TypeScriptProxyGenerator;
using System.ComponentModel;

namespace ACServerApi.Models
{
    [TSGen(TSGenTag.ClientModel)]
    [IniSettingsAttribute("DYNAMIC_TRACK")]
    public class ACConfigDynamicTrack : ACConfigBase
    {
        public ACConfigDynamicTrack()
        {
            // Default values
            this.SessionStart       = 90;
            this.Randomness         = 1;
            this.LapGain            = 1;
            this.SessionTransfer    = 90;
        }

        [IniSettingsAttribute("SESSION_START")]
        [DisplayName("Session Start")]
        [Description("% level of grip at session start")]
        public int SessionStart { get; private set; }

        [IniSettingsAttribute("RANDOMNESS")]
        [DisplayName("Randomness")]
        [Description("Level of randomness added to the start grip")]
        public int Randomness { get; set; }

        [IniSettingsAttribute("LAP_GAIN")]
        [DisplayName("Lap Gain")]
        [Description("How many laps are needed to add 1% grip")]
        public int LapGain { get; set; }

        [IniSettingsAttribute("SESSION_TRANSFER")]
        [DisplayName("Session Transfer")]
        [Description("how much of the gained grip is to be added to the next session 100 -> all the gained grip. Example: difference between starting (90) and ending (96) grip in the session = 6%, with session_transfer = 50 then the next session is going to start with 93.")]
        public int SessionTransfer { get; set; }
    }
}